<style lang="scss" scoped>
  @import '@/assets/css/variable';
 .item {
 	// margin-top: 0.4rem;
 	// margin-left: 1rem;
 	// margin-right: 1rem;
 	padding: 10px 6px 10px 6px;
 	background-color: white;
 	border-bottom: 1px solid #f7f7f7;
 	display: flex;
	flex-direction: column;
	.linetop{
		display: flex;
		.flex-right {
			flex: 0 0 9rem;
			height: 7rem;
			overflow: hidden;
			position: relative;
			img{
				object-fit: cover;
				width: 100%;
			}
		}
						
		.flex-left {
			flex: 1;
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			margin-right: 10px;
			.title {
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 1;
				/* 设置行数 */
				-webkit-box-orient: vertical;
				overflow: hidden;
				color: $color0;
				font-size: 1.5rem;
				line-height: 1.3em;
				justify-content: space-around;
				text-align: justify;
			}
			.desc {
				line-height: 1.3em;
				color: $color3;
				display: flex;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				/* 设置行数 */
				-webkit-box-orient: vertical;
				overflow: hidden;
				span {
					color: #D8D7D7;
					&.split {
						font-size: 1rem;
					}
				}
			}
		}
	}
 	.linebottom{
		margin-top: 10px;
		font-size: 1.2rem;
		.line{
			color: $color3;
			.time{
				margin-left: 1rem;
			}
		}
	}
 }
</style>

<template>
  <div class="item" @click="toView(renderList)" >
  	<div class="linetop">
		<div class="flex-left">
			<div class="title">{{renderList.title}}</div>
			<div class="desc">
				{{renderList.abstracts}}
			</div>
		</div>
		<div class="flex-right">
			<img :src="(renderList.img)" alt="">
		</div>
	</div>
	<div class="linebottom">
		<div class="line">
			<span>{{renderList.unit}}</span>
			<span class="time">{{renderList.updateTime}}</span>
		</div>
	</div>
  </div>
</template> 
<script>
import { Image as VanImage, Popup,Button,Toast,Icon } from 'vant';

export default {
  name: "CaseList1",
  components: {
    [Icon.name]: Icon,
    [Button.name]: Button,
    [Popup.name]: Popup,
    VanImage
  },
  props: {
    caseList: Array,
    renderList: Object
  },
  data() {
    return {
      show: false,
      caseItem: {}
    }
  },
  created () {
    const _this = this;
    //const caseList = _this.$store.getters.getCaseTabsList;
    
  },
  methods: {	  
    toView(datalist){
      this.$router.push('/infoDetail')
	    this.$store.commit('setInfoback', datalist)
	},
    // getCaseById(id) {
	// 	console.log(id);
    //     const _this = this;
    //     const toast = Toast.loading({
    //         forbidClick: true,
    //         message: '加载中...',
    //     });
    //     let params = {
    //         id: id
    //     }
    //     _this.$request.QueryById(params).then(res=>{
    //         _this.caseItem = res.data
    //         // this.$store.commit('setCaseItem', _this.caseItem);
    //         toast.clear()
    //         _this.show = true
    //     })
    //   },
      // 拼接项目地址
      
  }
};
</script>
